package bank;

import static org.junit.Assert.*;

import org.junit.Test;

public class CardDaoImplTest {
	
	CardDao dao = new CardDaoImpl();

	@Test
	public void testInsert() {
		assert dao.insert(new Card(1,"a",100,false)) : "error";
		assert dao.insert(new Card(2,"b",200,false)) : "error";
		assert dao.insert(new Card(3,"c",300,false)) : "error";
		assert dao.insert(new Card(4,"d",400,false)) : "error";
	}

	@Test
	public void testDeleteById() {
		assert dao.deleteById(1) : "error";
	}

	@Test
	public void testAddMoney() {
		assert dao.addMoney(2, 1000) : "error";
	}

	@Test
	public void testTakeMoney() {
		assert dao.takeMoney(2, 500) : "error";
	}

	@Test
	public void testSelectMoney() {
		System.out.println(dao.selectMoney(2));
	}

}
